<template>
<div class="top">
    <div class="content">
        <!-- 左侧 -->
        <div class="left" @click="goHome">
            <img src="../../assets/images/logo.png" alt="" class="logo">
            <div class="top_name">尚医通 预约挂号统一平台</div>
        </div>
        <!-- 右侧 -->
        <div class="right">
            <p class="help">帮助中心</p>
            <p class="login" @click="login">登录/注册</p>
        </div>
    </div>
</div>
</template>
<script setup lang='ts'>
//引入路由器
import { useRouter } from 'vue-router';
//获取user仓库数据
import useUserStore from '@/store/modules/user';
let userStore = useUserStore();
let $router = useRouter();
const goHome =()=>{
    //编程式导航跳转到首页
    $router.push({path:'/home'})
}
//点击登录注册
const login = ()=>{
    userStore.visible = true
}
</script>
<style scoped lang="scss">
.top{
    position: fixed;
    z-index: 999;
    width: 100%;
    height: 70px;
    background-color: #fff;
    display: flex;
    justify-content: center;
    .content{
        width: 1200px;
        height: 70px;
        display: flex;
        justify-content: space-between;
        .left{
            display: flex;
            align-items: center;
            .logo{
                width: 70px;
                height: 70px;
                display: block;
            }
            .top_name{
                color:#55a6fe;
                font-size: 22px;
                margin-left: 10px;
            } 
        }
        .right{
            width: 166px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            color: #666;
            .help{
                margin-right: 40px;
            }
        }
        
    }
}

</style>